<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TRealdataLevelvalue extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_realdata_LevelValue', function (Blueprint $table) {
             $table->engine = 'MEMORY';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->float('rd_LevelValue1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue4', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue5', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue6', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue7', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue8', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue9', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue10', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_LevelValue_num', 9, 2)->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue1hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue2hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue3hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue4hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue5hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue6hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue7hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue8hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue9hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue10hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue1lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue2lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue3lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue4lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue5lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue6lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue7lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue8lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue9lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue10lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue1consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue2consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue3consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue4consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue5consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue6consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue7consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue8consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue9consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_LevelValue10consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('pdi_index', 'pdi_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_realdata_LevelValue');
    }
}
